#include <iostream>
using namespace std;

int n, a;
int res = 0;

int main()
{
    freopen("cin.txt", "r", stdin);
    cin >> n;
    for (int i = 1; i <= n; ++i)
    {
        cin >> a;
        if (i % 2) //只选择奇数台阶的进行异或
            res ^= a;
    }
    if (res)
        cout << "Yes";
    else
        cout << "No";
    return 0;
}